package com.cjlgb.design.upms.api.feign;

import com.cjlgb.design.common.core.constant.InnerApps;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.Collection;

/**
 * @author WFT
 * @date 2019/7/29
 * description: 用户服务内部接口
 */
@FeignClient(value = "cjlgb-design-upms-biz")
public interface UserFeign {

    /**
     * 获取账号的权限列表
     * @param accountId 账号Id
     * @param innerApp 内部的应用名称
     * @return Collection<String>
     */
    @GetMapping(value = "/account/getAccountAuthorities")
    Collection<String> getAccountAuthorities(
            @RequestParam(value = "accountId") Long accountId,
            @RequestHeader(value = InnerApps.INNER_APP) String innerApp
    );

}
